'use strict';

const { DataTypes } = require('sequelize');
const model = {
    // Model attributes are defined here
    name: {
        type: DataTypes.STRING,
        allowNull: false
    },
    price: {
        type: DataTypes.DECIMAL(18,2),
        allowNull: false
    },
    stock: {
        type: DataTypes.INTEGER,
        allowNull: true,
        default:0
    },
    supplier: {
        type: DataTypes.STRING,
        allowNull: true
    },

}

module.exports = model;